{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# Stationary Iterative Methods for Linear Systems"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\n",
        "import scipy.linalg as la\n",
        "\n",
        "import matplotlib.pyplot as pt"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Let's solve $u''=-30x^2$ with $u(0)=1$ and $u(1)=-1$."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "n = 50\n",
        "\n",
        "mesh = np.linspace(0, 1, n)\n",
        "h = mesh[1] - mesh[0]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Set up the system matrix `A` to carry out centered finite differences\n",
        "\n",
        "$$\n",
        "u''(x)\\approx \\frac{u(x+h) - 2u(x) + u(x-h)}{h^2}.\n",
        "$$\n",
        "\n",
        "Use `np.eye(n, k=...)`. What needs to be in the first and last row?"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "A = (np.eye(n, k=1) + -2*np.eye(n) + np.eye(n, k=-1))/h**2\n",
        "A[0] = 0\n",
        "A[-1] = 0\n",
        "A[0,0] = 1\n",
        "A[-1,-1] = 1"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Next, fix the right hand side:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "b = -30*mesh**2\n",
        "b[0] = 1\n",
        "b[-1] = -1"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Compute a reference solution `x_true` to the linear system:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7f1cd81932e8>]"
            ]
          },
          "execution_count": 10,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGtVJREFUeJzt3XucFOWV//HPATKAAnIRRe7ooqgkIrhcXIOzaBREUWOM\nklXAHzEQNWo2iUTXvECz64r7SqImRoxhvcS4iMFVQYgm6kQIGl0IispFwnA3qFwUBLkM5/fH0+MM\nQw/TTNd0dXd9369Xvbp6pqbqUMzU6fM89Txl7o6IiCRTo7gDEBGR+CgJiIgkmJKAiEiCKQmIiCSY\nkoCISIIpCYiIJFgkScDMpprZRjN7q5bvn2lmW81sYWq5NYrjiohIdppEtJ+HgJ8Djx5km1fcfURE\nxxMRkQhEUgm4+zxgSx2bWRTHEhGR6OSyT2Cgmf3VzJ4zs5NyeFwREalFVM1BdVkAdHP3HWY2DHga\nOD5HxxYRkVrkJAm4+/Zq63PM7Jdm1tbdN1ffzsw0kZGISD24e72a3KNsDjJqafc3s6OrrfcHrGYC\nqOTuWtyZOHFi7DHky6JzoXOhc3HwJRuRVAJm9jhQCrQzszXARKAEcHf/FfA1M/s2sAfYCVwWxXFF\nRCQ7kSQBd/9GHd+/D7gvimOJiEh0NGI4T5WWlsYdQt7Quaiic1FF5yIalm17UpTMzPMpHhGRQmBm\neB50DIuISIFREhARSTAlARGRBFMSEBFJMCUBEZEEUxIQEUkwJQERkQRTEhARSTAlARGRBFMSEBFJ\nMCUBEZEEUxIQEUkwJQERkQRTEhARSTAlARGRBFMSEBFJMCUBEZEEUxIQEUkwJQERkQRTEhARSTAl\nARGRBFMSEBFJMCUBEZEEUxIQEUkwJQERkQRrEncAUjh274Zt22D79qrX7dthxw747LP0y969UFFx\n4LJvHzRqBI0bh6X6+he+AM2aQfPm+y/NmkGLFtC6ddXSsiWYxX1m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bkMLscyORdXA/e5+ycA7v5RjmPM\nlUzOxT6gVWq9NbA+h/HljLvPA7YcZJMLgUdT2/4FOMLMjq5rv3EkgUwGj32+jYeO5a1m1jY34eXU\noQ6kGwvMadCI4lPnuUiVt53dfXYuA4tBJr8XxwMnmNk8M5tvZufmLLrcyuRc3AZcmbpJZRbwnRzF\nlm9qnqv1ZPChMcpbRDOVyeCxmttYmm2KQcYD6czsCqAfoXmoGB30XJiZAT8DRtfxM8Ugk9+LJoQm\nocFAV2CumZ1cWRkUkUzOxUjgIXf/WWpc0mOEecqSpl4Dc+OoBNYRfmkrdQY21NhmLdAFwMwaE9o9\nD1YGFapMzgVmdjZwM3BBqiQuRnWdi5aEP+wyMysn3Jb8TJF2Dmfye7EOeMbd97n7KmAZ0DM34eVU\nJudiLDAdwN1fA5qZ2ZG5CS+vrCN13UxJez2pKY4k8PngMTMrIQwee7bGNjOp+sR3KfBSDuPLpTrP\nhZmdCkwBRrj7phhizJWDngt3/8Tdj3L3Y929B6F/5AJPM0q9CGTyN/I0MAQgdcHrCazMaZS5kcm5\nWA2cDWBmJwJNi7iPxKi9An4WGAWfz9Sw1d031rXDnDcHuXuFmVUOHmsETHX3JWZ2G/CGu88CpgK/\nMbP3gE2E//iik+G5uAs4HHgy1SSy2t0vii/qhpHhudjvRyjS5qBMzoW7P29m55jZO8Be4PvFWC1n\n+HvxfeBBM/suoZN4dO17LFxm9jhQCrQzszXARKCEMA3Pr9x9tpmdZ2YrgE+BqzLab+p2IhERSSA9\nXlJEJMGUBEREEkxJQEQkwZQEREQSTElARCTBlARERBJMSUBEJMGUBEREEuz/A3hI5yO7oWfsAAAA\nAElFTkSuQmCC\n",
            "text/plain": [
              "<matplotlib.figure.Figure at 0x7f1cd84cc780>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "x_true = la.solve(A, b)\n",
        "pt.plot(mesh, x_true)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Next, we'll try all the stationary iterative methods we have seen."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Jacobi"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 44,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "x = np.zeros(n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Next, apply a Jacobi step:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 42,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "x_new = np.empty(n)\n",
        "\n",
        "for i in range(n):\n",
        "    x_new[i] = b[i]\n",
        "    for j in range(n):\n",
        "        if i != j:\n",
        "            x_new[i] -= A[i,j]*x[j]\n",
        "        \n",
        "    x_new[i] = x_new[i] / A[i,i]\n",
        "\n",
        "x = x_new"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 43,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<matplotlib.legend.Legend at 0x7f1cd2f38ef0>"
            ]
          },
          "execution_count": 43,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNX9//HXJwlJgCQQ1rCGRVxRligIX0tToSouqHVB\nrCIUFcS9tXX5asHW+tXaRW2xuCJU/SEVFVAQFxpBEVAUkF1lXwVMWMOS5Pz+mCSEmIRkZjJ3lvfz\n8biPuTP3zLkfrvF+5pxzz73mnENERGJTnNcBiIiId5QERERimJKAiEgMUxIQEYlhSgIiIjFMSUBE\nJIYFJQmY2Ytmtt3MllSy/admlmdmXxYvDwZjvyIiEpiEINUzDvgHMKGKMrOdcwOCtD8REQmCoLQE\nnHOfALnHKWbB2JeIiARPKMcEzjazr8zsXTM7NYT7FRGRSgSrO+h4FgKZzrkDZtYfeBs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XHt84yOXuApmqUeB6vw/8jZwLkDxCa8TsCakUYZGdY7FeqAfgJmdAiRF8RiJ\nUXkLeCowGErv1JDnnNt+vApD3h3knCs0s5LJY3HAi865FWb2MPC5c+4d4EXg32b2DbAL33/4qFPN\nY/FnoD7wn+IukfXOucu8i7p2VPNYHPMVorQ7qDrHwjk308zOM7NlQAFwTzS2lqv5d3EP8LyZ3Y1v\nkPiGymuMXGb2GpANNDazDcAoIBHfbXiec85NN7MLzexbYD8wtFr1Fl9OJCIiMUiPlxQRiWFKAiIi\nMUxJQEQkhikJiIjEMCUBEZEYpiQgIhLDlARERGKYkoCISAz7/4iJKvWcGNXOAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<matplotlib.figure.Figure at 0x7f1cd8526a58>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "pt.plot(mesh, x)\n",
        "pt.plot(mesh, x_true, label=\"true\")\n",
        "pt.legend()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "* Ideas to accelerate this?\n",
        "* Multigrid"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Gauss-Seidel"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 45,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "x = np.zeros(n)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 64,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<matplotlib.legend.Legend at 0x7f1cd28169e8>"
            ]
          },
          "execution_count": 64,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FWXax/Hvk4QkENLoJRCCooDoUlwFVIzgqiAo2ABX\nKWJBFsvaZX1XsC2sr66iKCI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4vWkODeSQMHkMWNMKM7k\nsZnFtplF4R3fzcBCL8bnTac9F8aYNsBY4Dpr7X4XYvSWU54La+0ha20da21Ta20CTv9ID1vCLHU/\nUJq/kc+AzgB5F7xmwCavRukdpTkXW4ArAYwxLYAwP+4jMZy8BjwT6AcFT2pIs9amnG6HXm8Ostbm\nGGPyJ48FAROsteuMMSOAZdbaz4EJwHvGmI3Afpz/eL9TynPxbyAC+CivSWSLtbane1FXjFKeixO+\nBT9tDirNubDWzjfGXGWMWQNkA4/4Y225lL8XjwBvG2P+jtNJ3P/ke6y8jDFTgESgpjFmK/A0EIrz\nGJ5x1to5xphuxpjfgMPAwFLtN284kYiIBCC9XlJEJIApCYiIBDAlARGRAKYkICISwJQEREQCmJKA\niEgAUxIQEQlgSgIiIgHs/wGthhk4tXDXRAAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<matplotlib.figure.Figure at 0x7f1cd283dcf8>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "x_new = np.empty(n)\n",
        "\n",
        "for i in range(n):\n",
        "    x_new[i] = b[i]\n",
        "    for j in range(i):\n",
        "        x_new[i] -= A[i,j]*x_new[j]\n",
        "    for j in range(i+1, n):\n",
        "        x_new[i] -= A[i,j]*x[j]\n",
        "        \n",
        "    x_new[i] = x_new[i] / A[i,i]\n",
        "\n",
        "x = x_new\n",
        "pt.plot(mesh, x)\n",
        "pt.plot(mesh, x_true, label=\"true\")\n",
        "pt.legend()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "### And now Successive Over-Relaxation (\"SOR\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 92,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "x = np.zeros(n)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 106,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(-1.3, 1.3)"
            ]
          },
          "execution_count": 106,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD7CAYAAACMlyg3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FNX6wPHvSQ8hBRJDTxEQuCiCCAIiBlBKlCKKwFVB\nREURuBau+NOrAlbUa7kXFBFEFBERRFHwKoihiIBSLBCKAiH0UJKQQCDl/P446SRkSTY7W97P88yz\ns7uzM+9ONvPOKTNHaa0RQgjhmbysDkAIIYR1JAkIIYQHkyQghBAeTJKAEEJ4MEkCQgjhwSQJCCGE\nB/OxOoDilFLSX1UIISpBa60q8zmnKwlorWXSmmeffdbyGJxlkn0h+0L2xYWnqnC6JCCEEMJxJAkI\nIYQHkyTgpOLi4qwOwWnIvigi+6KI7Av7UFWtT7InpZR2pniEEMIVKKXQlWwYdqreQUIIUVxMTAxJ\nSUlWh+E0oqOj2bt3r13XKSUBIYTTyj/DtToMp1He/qhKSUDaBIQQwoNJEhBCCA8mSUAIITyYJAEh\nhPBgkgSEEKKSYmNjWbFihdVhVIl0ERWFtNZknMsgNSuV1KxU0s6mFc6nn00n41wGGecyyDyXaeaz\nzfMz2WfIyskiKyeLs7lnzWOOeczJyyFX55Kn88jNyyVX55KbZ557KS+8lBfeXt7mUZlHX29fAnwC\nCPAJINAnkEDfwML5IL8gQv1DCQsII9Q/lNCAovnwGuHUCapDZFAkIf4hKFWpzhJC2EVubi7e3t5W\nh1Eh6SLqpgoO6Eczj3I08ygpp1MK54+fPs7xM/nT6aLH1KxUAnwCCAsIMwfWYgfYUP9QavrVPG8K\n8guihm8NAnwC8Pf2Lzx4B/gE4O/jj4+XT+EB3tvLu/BA76W80OjChFA8UWTnZRcmlTPZZziTc6Zw\nPuNcBmln00jLSit8TD2bSlpWGsdOH+No5lGOZB4hJy+HyKBIIoMiqRNUh4YhDYkOjSY6LJro0Gii\nQqOoH1wfby/n/yf1ZM7cRXTo0KF8/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BgkgSEEMKDSRIQQggPJklACCE82P8DeNVn3NiwUnIAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<matplotlib.figure.Figure at 0x7f1cd26a93c8>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "x_new = np.empty(n)\n",
        "\n",
        "for i in range(n):\n",
        "    x_new[i] = b[i]\n",
        "    for j in range(i):\n",
        "        x_new[i] -= A[i,j]*x_new[j]\n",
        "    for j in range(i+1, n):\n",
        "        x_new[i] -= A[i,j]*x[j]\n",
        "        \n",
        "    x_new[i] = x_new[i] / A[i,i]\n",
        "\n",
        "direction = x_new - x\n",
        "omega = 1.5\n",
        "x = x + omega*direction\n",
        "\n",
        "pt.plot(mesh, x)\n",
        "pt.plot(mesh, x_true, label=\"true\")\n",
        "pt.legend()\n",
        "pt.ylim([-1.3, 1.3])"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": []
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.1+"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}